<template>
  <el-form :rules="rules" @validate="doValidate" ref="form" :model="form" class="client_type" label-width="35%" size="small" label-position="left">
    <el-collapse v-model="activeNames">
      <el-collapse-item name="1">
        <template slot="title">

            <div class="titlefirst">
              <i class="title_bar"></i>
              <span class="title_name">客户信息</span>
            </div>



        </template>


        <pcic-form @validate="$emit('validate', $event)" class="whitebox" v-bind="_crudProps"
                   v-on="_crudListeners" ref="d2Crud">
          <el-row slot="header" slot-scope="scope">
            <my-col>
              <el-form-item label-width="0" >
                <el-radio-group v-model="scope.form.radio1">
                  <el-radio-button label="个人"></el-radio-button>
                  <el-radio-button label="团体"></el-radio-button>
                </el-radio-group>
              </el-form-item>
            </my-col>
            <my-col>
              <el-form-item label="角色:" label-width="70px">
                <el-checkbox-group v-model="scope.form.checkedCities">
                  <el-checkbox v-for="city in cities" :label="city" :key="city">{{ city }}</el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </my-col>
            <my-col>
              <el-form-item class="flex justify-end" label-width="0">
                <el-button type="primary">111</el-button>
                <el-button type="primary">111</el-button>
              </el-form-item>
            </my-col>
          </el-row>

        </pcic-form>
      </el-collapse-item>
    </el-collapse>
  </el-form>

</template>
<script>
import { d2CrudPlus } from 'd2-crud-plus'
import { crudOptions } from './crud'

export default {
  mixins: [d2CrudPlus.crud],
  data () {
    return {
      lock: false,
      form:{
        mobile:''
      },
      rules:{
        mobile: [
          {
            trigger: 'blur',
            required: true
          }
        ]
      },
      checkedCities: [],
      cities: ['投保人', '被保人'],
      activeNames: ['1'],
      sv: '',
      sv2: '',
      radio1: ''
    }
  },

  methods:{
    doLoad(){

    },
    async doValidate(){
      return await this.$refs.d2Crud.doValidate()
    },
    getCrudOptions () {
      return crudOptions
    },
  }

}
</script>

